export class EnumUtil {
    static getName(enumType: any, value: any): string {
        for (const key in enumType) {
            if (enumType.hasOwnProperty(key) && enumType[key] === value) {
                return key;
            }
        }
        throw new Error(`Value '${value}' is not a valid enum member of '${enumType.name}'.`);
    }
}